import { lazy } from "react";
import { Navigate } from 'react-router-dom'
import { RouteConfig } from '@/types/router'

let ErrorPage = lazy(() => import('@/views/errorPage'))

// 错误页面模块
const route: RouteConfig[] = [
  // {
  //   path: "/403",
  //   element: lazyLoad(lazy(() => import("@/components/ErrorPages/403"))),
  // },
  {
    path: "/404",
    element: <ErrorPage />,
  },
  {
    path: "*",
    element: <Navigate to="/404" />,
    meta: {
      title: "重定向404",
      hidden: true,
    }
  },
  // {
  //   path: "/500",
  //   element: lazyLoad(lazy(() => import("@/components/ErrorPages/500"))),
  // },
];

export default route;
